YES 0.853
↳ HASKELL
↳ BR
((lookupFM :: FiniteMap Bool a -> Bool -> Maybe a) :: FiniteMap Bool a -> Bool -> Maybe a) |
import qualified Maybe import qualified Prelude |
||||||||||||||||||||||||
data FiniteMap a b = EmptyFM | Branch a b Int (FiniteMap a b) (FiniteMap a b) |
||||||||||||||||||||||||
instance (Eq a, Eq b) => Eq (FiniteMap b a) where |
||||||||||||||||||||||||
lookupFM :: Ord a => FiniteMap a b -> a -> Maybe b
|
import qualified FiniteMap import qualified Prelude |
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
((lookupFM :: FiniteMap Bool a -> Bool -> Maybe a) :: FiniteMap Bool a -> Bool -> Maybe a) |
import qualified Maybe import qualified Prelude |
||||||||||||||||||||||||
data FiniteMap a b = EmptyFM | Branch a b Int (FiniteMap a b) (FiniteMap a b) |
||||||||||||||||||||||||
instance (Eq a, Eq b) => Eq (FiniteMap b a) where |
||||||||||||||||||||||||
lookupFM :: Ord a => FiniteMap a b -> a -> Maybe b
|
import qualified FiniteMap import qualified Prelude |
lookupFM EmptyFM key = Nothing lookupFM (Branch key elt vw fm_l fm_r) key_to_find
| key_to_find < key
= lookupFM fm_l key_to_find | key_to_find > key
= lookupFM fm_r key_to_find | otherwise
= Just elt
lookupFM EmptyFM key = lookupFM4 EmptyFM key lookupFM (Branch key elt vw fm_l fm_r) key_to_find = lookupFM3 (Branch key elt vw fm_l fm_r) key_to_find
lookupFM1 key elt vw fm_l fm_r key_to_find True = lookupFM fm_r key_to_find lookupFM1 key elt vw fm_l fm_r key_to_find False = lookupFM0 key elt vw fm_l fm_r key_to_find otherwise
lookupFM0 key elt vw fm_l fm_r key_to_find True = Just elt
lookupFM2 key elt vw fm_l fm_r key_to_find True = lookupFM fm_l key_to_find lookupFM2 key elt vw fm_l fm_r key_to_find False = lookupFM1 key elt vw fm_l fm_r key_to_find (key_to_find > key)
lookupFM3 (Branch key elt vw fm_l fm_r) key_to_find = lookupFM2 key elt vw fm_l fm_r key_to_find (key_to_find < key)
lookupFM4 EmptyFM key = Nothing lookupFM4 wv ww = lookupFM3 wv ww
compare x y
| x == y
= EQ | x <= y
= LT | otherwise
= GT
compare x y = compare3 x y
compare0 x y True = GT
compare2 x y True = EQ compare2 x y False = compare1 x y (x <= y)
compare1 x y True = LT compare1 x y False = compare0 x y otherwise
compare3 x y = compare2 x y (x == y)
undefined
| False
= undefined
undefined = undefined1
undefined0 True = undefined
undefined1 = undefined0 False
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
(lookupFM :: FiniteMap Bool a -> Bool -> Maybe a) |
import qualified Maybe import qualified Prelude |
|||||||||
data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a) |
|||||||||
instance (Eq a, Eq b) => Eq (FiniteMap a b) where |
|||||||||
lookupFM :: Ord b => FiniteMap b a -> b -> Maybe a
|
|||||||||
|
|||||||||
|
|||||||||
|
|||||||||
|
|||||||||
|
import qualified FiniteMap import qualified Prelude |
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
new_lookupFM(Branch(False, wx31, wx32, wx33, wx34), True, h) → new_lookupFM(wx34, True, h)
new_lookupFM(Branch(True, wx31, wx32, wx33, wx34), False, h) → new_lookupFM(wx33, False, h)
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
new_lookupFM(Branch(True, wx31, wx32, wx33, wx34), False, h) → new_lookupFM(wx33, False, h)
From the DPs we obtained the following set of size-change graphs:
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
new_lookupFM(Branch(False, wx31, wx32, wx33, wx34), True, h) → new_lookupFM(wx34, True, h)
From the DPs we obtained the following set of size-change graphs: